@all @sanity @regression
Feature: To check the login functionality

  Background: 
    Given user is registered

  @login
  Scenario Outline: Verify user can login with valid user name
    Given User is in Login Page
    When User tries to Login with <username> and <password>
    Then User successfully logs in
    And see a welcome message with <first name>

    Examples: 
      | username            | password   | first name |
      | sangajala@gmail.com | reliance12 | sriramkasdjlskajd    |
      | gjkumar@gmail.com   | test       | test       |

@dan
Scenario: User who is registered cannot be able to register again

Given User is already registered
When he tries to register
Then an error message should be displayed
  #Scenario: Error message should be shown for max limit
  #
  #Given Limit for the hotel is set for max rooms
  #When CM try to exceed the room limt
  #Then Error message should be shown
  #And Message should say 'Max Limit Reached'
  #	@search
  #	Scenario: User can search product by title
  #
  #	Given Consumer want to search an item from a germany webiste by title
  ##		Given I am logged in
  ##		 When I select the group "All Websites"
  ##		  And select the website "Germany" from the league table
  ##             And select the "Title" option from the search dropbox
  #
  #             When consumer searchs for <term>
  #
  ##             And search for the term "Magus"
  #          Then Consumer  should see the facets
  #          And the total values of the seaerch resutls
  #          And the totals should be matched
  ##             Then I should see there are facets visible
  ##               And see there are results
  ##               And only see the "Web pages" facet
  ##               And see totals all match
  ##               And see the bottom pager is present
  ##               And see the paging details match
  Scenario Outline: Check the links and the titles
    Given the user is home page
    When the user navigates to the category as <Category>
    Then the user navigates to next page
    And the title of the subsequent page is <Title>

    Examples: 
      | Category | Title                             |
      | Books    | nopeCommerce Demo store. Books    |
      | Computer | nopeCommerce Demo store. Computer |
